import React, { createElement } from 'react';
import { render } from 'react-dom';
import './style.css';

// const { createElement } = require("react")
// const { render } = require("react-dom")

// createElement(结构名称, 属性, 子节点)  创建react元素

// render(react元素, 挂载元素, callback)

// function App() {
//     return <div className='box'>
//         我是组件
//     </div>
// }

const oSpan = React.createElement(
    'span',
    null,
    '--4567899999998888888888'
);

// // 虚拟Dom
const oDiv = createElement("div", {
    className: "box"
}, ['123', oSpan]);

render(oDiv, document.getElementById("root"), () => {
    console.log('挂载成功');
});
